// 负责所有的用户公共状态
import mutations from './mutations';
import actions from './actions';

export default {
  namespaced: true,
  state: {
    username: '' || sessionStorage.getItem('username'),
    userId: '' || sessionStorage.getItem('userId'),
    token: '' || sessionStorage.getItem('token'),
    role: JSON.parse(sessionStorage.getItem('role') || '[]')
  },
  getters: { // 复杂运算，对 state 进行过滤处理
  },
  mutations,
  actions,
  modules: {
  }
}
